            //获取计算样式    兼容处理
			function getStyle(box){
				return box.currentStyle ? box.currentStyle : getComputedStyle(box)
			}
			
			//封装缓冲运动、透明度渐变
			function animate(box,obj,callbackfn){
				clearInterval(box.timer);
				
				
				box.timer=setInterval(function(){
					var flag=true;
					for(var key in obj){
						if(key == 'opacity'){
							var current=parseFloat(getStyle(box)[key]*100);
							var target=obj[key]*100;
							var speed=(target-current)/8
							speed=(speed>0 ? Math.ceil(speed) : Math.floor(speed));
							var op=current+speed;
							//console.log(op/100)
							box.style[key]=op/100
							
						}else{
							var current=parseFloat(getStyle(box)[key]);
							//console.log(typeof current.toFixed(2)) string
							current=Number(current.toFixed(2))
							var target=obj[key];
							var speed=(target-current)/3;
							
							speed=(speed>0 ? Math.ceil(speed) : Math.floor(speed));
							//console.log(speed)
							box.style[key]=current+speed+'px';
							//console.log(box.style[key])
						}
						
						
						if(Math.abs(current - target) > 1){
							flag=false
						
						}
					
					}
					
					
					if(flag == true){
						clearInterval(box.timer);
						//console.log('定时器已清除')
						for(var key in obj){
							box.style[key]=obj[key]+'px'
						}
						if(callbackfn){
							callbackfn();
						}
						
					}
					
					
				},40)
			}